/***************************************************************************
 *   mgpi.h - MGPI Type & Routines' Names Definitions                      *
 *   Copyright (C) 2008 by cmaster.matso                                   *
 *   cmaster.matso@gmail.com                                               *
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 *   This program is distributed in the hope that it will be useful,       *
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
 *   GNU General Public License for more details.                          *
 *                                                                         *
 *   You should have received a copy of the GNU General Public License     *
 *   along with this program; if not, write to the                         *
 *   Free Software Foundation, Inc.,                                       *
 *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
 ***************************************************************************/

#ifndef __MGPI_H
#define __MGPI_H

#ifdef __cplusplus
extern "C" {
#endif

#include "main/src/mgpi.h"
#include "mgpi_game.h"
#include "gmgpi.h"

    /* Main */
#define MGPF_Exit MGPI_Exit
#define MGPF_Init MGPI_Init
#define MGPF_InitFramework MGPI_InitFramework

    /* Components */
#define MGPF_InitContainer MGPI_InitContainer
#define MGPF_GetRootComponent MGPI_GetRootComponent

    /* Multi-threading (using SDL) */
#define MGPF_AddThread MGPI_AddThread
#define MGPF_GetThread MGPI_GetThread
#define MGPF_GetThreadsNumber MGPI_GetThreadsNumber
#define MGPF_DeleteThreads MGPI_DeleteThreads
#define MGPF_AsyncCall MGPI_AsyncCall

    /* Garbage collector */
#define MGPF_CollectGarbage MGPI_CollectGarbage
#define MGPF_RemoveGarbage MGPI_RemoveGarbage

    /* EHI - Event Handling Interface (using SDL) */
#define MGPF_InitEvents MGPI_InitEvents
#define MGPF_AsyncProc MGPI_AsyncProc
#define MGPF_FreeTimer MGPI_FreeTimer
#define MGPF_FilteredListener MGPI_FilteredListener
#define MGPF_Listener MGPI_Listener
#define MGPF_UserListener MGPI_UserListener

    /* Mathematical Calculations */
#define MGPF_VecLength MGPI_VecLength
#define MGPF_CrossProduct MGPI_CrossProduct
#define MGPF_DotProduct MGPI_DotProduct
#define MGPF_Normalize MGPI_Normalize
#define MGPF_Uniform4 MGPI_Uniform4
#define MGPF_Uniform3 MGPI_Uniform3
#define MGPF_MatrixMul3 MGPI_MatrixMul3
#define MGPF_MatrixMul4 MGPI_MatrixMul4
#define MGPF_MatrixMulVect3 MGPI_MatrixMulVect3
#define MGPF_MatrixMulVect4 MGPI_MatrixMulVect4
#define MGPF_VectorMulMatr3 MGPI_VectorMulMatr3
#define MGPF_VectorMulMatr4 MGPI_VectorMulMatr4
#define MGPF_ToArray16 MGPI_ToArray16
#define MGPF_ToArray9 MGPI_ToArray9
#define MGPF_ToArray4x4 MGPI_ToArray4x4
#define MGPF_ToArray3x3 MGPI_ToArray3x3
#define MGPF_TransMatrix4x4 MGPI_TranspMatr4x4
#define MGPF_TransMatrix3x3 MGPI_TranspMatr3x3
#define MGPF_TransMatrix16 MGPI_TranspMatr16
#define MGPF_TransMatrix9 MGPI_TranspMatr9

    /* GPU Stream Computations (out?) */
#define MGPF_BeginVectorComputations MGPI_BeginVectorComputations
#define MGPF_EndVectorComputations MGPI_EndVectorComputations
#define MGPF_AllocGPUStreams MGPI_AllocGPUStreams
#define MGPF_AllocGPUParam MGPI_AllocGPUParam
#define MGPF_AllocGPUStreams4NV32 MGPI_AllocGPUStreams4NV32
#define MGPF_AllocGPUStreamsNV32 MGPI_AllocGPUStreamsNV32
#define MGPF_AllocGPUStreams4ATI32 MGPI_AllocGPUStreams4ATI32
#define MGPF_AllocGPUStreamsATI32 MGPI_AllocGPUStreamsATI32
#define MGPF_ReadGPUStream MGPI_ReadGPUStream
#define MGPF_WriteGPUStreamNV MGPI_WriteGPUStreamNV
#define MGPF_WriteGPUStreamATI MGPI_WriteGPUStreamATI
#define MGPF_SetGPURoutineCode MGPI_SetGPURoutineCode
#define MGPF_ReisterGPURoutine MGPI_RegGPURoutine
#define MGPF_SetupGPUParam MGPI_SetupGPUParam
#define MGPF_SetGPUVariable MGPI_SetGPUVariable
#define MGPF_CallRoutine MGPI_CallRoutine
#define MGPF_FreeGPURoutine MGPI_FreeGPURoutine
#define MGPF_FreeGPUStream MGPI_FreeGPUStream
#define MGPF_FreeGPUParam MGPI_FreeGPUParam
#define MGPF_FreeComputKernel MGPI_FreeComputKernel

    /* Errors Handling */
#define MGPF_GetMessage MGPI_GetMessage
#define MGPF_PostMessage MGPI_PostMessage
#define MGPF_GetLastMessage MGPI_GetLastMessage
#define MGPF_PostMessagef MGPI_PostMessagef
#define MGPF_GetLastMessageNode MGPI_GetLastMessageNode
#define MGPF_GetMessages MGPI_GetMessages

    /* MGPI/F types names definitions */
    typedef comp_t MGPI_Component;
    typedef cont_t MGPI_Container;

    typedef usrevt_t MGPI_Event;
    typedef filter_t MGPI_Filter;

    typedef lstcmp_t MGPI_CompListElement;
    typedef lstcnt_t MGPI_ContListElement;

    typedef msgnode_t MGPI_ErrorNode;

    typedef GPUstream_t MGPI_GPUstream;
    typedef GPUparam_t MGPI_GPUparam;

    typedef rendnode_t MGPI_RendNode;
    typedef tree_t MGPI_Tree;
    typedef thrctrl_t MGPI_ThreadCtrl;

    typedef float4 MGPI_Vect4;
    typedef float3 MGPI_Vect3;
    typedef float2 MGPI_Vect2;
    typedef float4x4 MGPI_Matr4x4;
    typedef float3x3 MGPI_Matr3x3;
    typedef MGPI_BOOL MGPI_Boolean;
    typedef MGPI_BYTE MGPI_Byte;

#ifndef WIN32
    typedef HANDLE MGPI_Handle;
#else
	typedef int WHANDLE;
	typedef WHANDLE MGPI_Handle;
#endif

    typedef MGPI_Container MGPF_Container;
    typedef MGPI_Component MGPF_Component;

    typedef MGPI_Event MGPF_Event;
    typedef MGPI_Filter MGPF_Filter;

    typedef MGPI_CompListElement MGPF_CompListElement;
    typedef MGPI_ContListElement MGPF_ContListElement;
    
    typedef MGPI_ErrorNode MGPF_ErrorNode;

    typedef MGPI_GPUstream MGPF_GPUstream;
    typedef MGPI_GPUparam MGPF_GPUparam;

    typedef MGPI_RendNode MGPF_RendNode;
    typedef MGPI_Tree MGPF_Tree;
    typedef MGPI_ThreadCtrl MGPF_ThreadCtrl;

    typedef MGPI_Vect4 MGPF_Vect4;
    typedef MGPI_Vect3 MGPF_Vect3;
    typedef MGPI_Vect2 MGPF_Vect2;
    typedef MGPI_Matr4x4 MGPF_Matr4x4;
    typedef MGPI_Matr3x3 MGPF_Matr3x3;
    typedef MGPI_Boolean MGPF_Boolean;
    typedef MGPI_Byte MGPF_Byte;
    typedef MGPI_Handle MGPF_Handle;

#ifdef __cplusplus
}
#endif

#endif
